#ifndef __HEAD__
#define __HEAD__

#include"threadPool.h"
#define M 1048576
int tcpInit(char *ip, char *port, int *pSockFd);
int epollAdd(int fd,int epfd);
int epollDel(int fd,int epfd);
void *threadFunc(void *parg);
int makeWorker(threadPool_t *pThreadPool);
typedef struct train_s{
    int dataLength;
    char buf[1000];
}train_t;

int makeWorker(threadPool_t *pThreadPool);
void unlock(void *parg);
int handleEvent(int netFd,char *token,char *tokenSalt);

//功能函数
int ls_c(int netFd);
int cd_c(char *pathBuf, int netFd);
int pwd(int netFd);
int sendFile(char filename[],int sdf);
int recvFile(int netFd,char *fileName);
int remove_net(int netfd);
//日志功能函数
void savelog(const char *funcnam);
void savetime(char *buf);
void viewlog(int netFd);

void get_salt(char *salt,char *passwd);
bool checkpwd(const char *name,const char *key);


#endif